/* 全局图表样式 */
.chart-container {
    height: 450px;
    /* Base height */
    width: 100%;
    min-width: 400px;
    /* 确保最小宽度 */
    padding: 10px;
    /* 添加内边距 */
    box-sizing: border-box;
}

/* 卡片样式 */
.chart-card {
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    /* 防止内容溢出 */
}

.chart-card:hover {
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.el-card {
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    /* 防止内容溢出 */
}

.el-card:hover {
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.el-card__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 14px;
}

.el-card__body {
    padding: 20px;
    height: calc(100% - 60px);
    overflow: hidden;
    /* 防止内容溢出 */
}

/* 页面容器 */
.page-container {
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* 页面标题 */
.page-header {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.page-header h1 {
    margin: 0 0 8px 0;
    color: #303133;
    font-size: 24px;
    font-weight: 600;
}

.page-header p {
    margin: 0;
    color: #909399;
    font-size: 14px;
}

/* 概览卡片 */
.overview-cards {
    margin-bottom: 20px;
    width: 100%;
}

.overview-cards .el-col {
    margin-bottom: 20px;
}

.overview-cards .el-card {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    height: 120px;
    /* 固定高度 */
}

.overview-cards .el-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.overview-cards .metric-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1;
}

.overview-cards .metric-label {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.2;
}

/* 实时监控 */
.realtime-monitor {
    margin-top: 20px;
    width: 100%;
}

.realtime-monitor .monitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ebeef5;
}

.realtime-monitor .monitor-item:last-child {
    border-bottom: none;
}

.realtime-monitor .monitor-label {
    font-weight: 500;
    color: #606266;
}

.realtime-monitor .monitor-value {
    font-weight: 600;
    color: #303133;
}

/* 预警列表 */
.alert-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 0;
    width: 100%;
}

.alert-list::-webkit-scrollbar {
    width: 6px;
}

.alert-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.alert-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.alert-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.alert-item {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.alert-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-item.danger {
    border-left-color: #f56c6c;
    background: linear-gradient(135deg, #fff5f5 0%, #fef0f0 100%);
}

.alert-item.warning {
    border-left-color: #e6a23c;
    background: linear-gradient(135deg, #fdf6ec 0%, #fef9f0 100%);
}

.alert-item.info {
    border-left-color: #409eff;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0f9ff 100%);
}

.alert-item.success {
    border-left-color: #67c23a;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0f9ff 100%);
}

/* 行和列布局优化 */
.el-row {
    width: 100%;
    margin: 0;
}

.el-col {
    padding: 0 10px;
    box-sizing: border-box;
}

/* 标签页优化 */
.el-tabs {
    width: 100%;
}

.el-tabs__content {
    width: 100%;
    overflow: hidden;
}

.el-tab-pane {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .chart-container {
        height: 400px;
        min-width: 350px;
        padding: 8px;
    }

    .alert-list {
        max-height: 400px;
    }

    .page-container {
        padding: 15px;
    }

    .overview-cards .metric-value {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 350px;
        min-width: 300px;
        padding: 5px;
    }

    .alert-list {
        max-height: 350px;
    }

    .page-container {
        padding: 10px;
    }

    .el-card__header {
        padding: 12px 16px;
        font-size: 13px;
    }

    .el-card__body {
        padding: 16px;
    }

    .overview-cards .metric-value {
        font-size: 24px;
    }

    .overview-cards .el-card {
        height: 100px;
    }

    .el-col {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 300px;
        min-width: 280px;
        padding: 5px;
    }

    .el-col {
        margin-bottom: 15px;
        padding: 0 5px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .overview-cards .metric-value {
        font-size: 20px;
    }

    .overview-cards .el-card {
        height: 80px;
    }

    .overview-cards .el-card__body {
        padding: 10px;
    }
}

/* 强制宽度样式 */
.force-full-width {
    width: 100% !important;
    max-width: 100% !important;
}

/* 图表特定样式 */
.echarts-container {
    width: 100% !important;
    height: 100% !important;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}